﻿using System.Collections.ObjectModel;
using System.Linq.Expressions;

namespace Lucene.Linq.Expressions
{
    internal sealed class ProjectedFields
    {
        private readonly ReadOnlyCollection<FieldDeclaration> _fields;
        private readonly Expression _projector;

        internal ProjectedFields(Expression projector, ReadOnlyCollection<FieldDeclaration> fields)
        {
            _projector = projector;
            _fields = fields;
        }

        internal Expression Projector
        {
            get { return _projector; }
        }

        internal ReadOnlyCollection<FieldDeclaration> Fields
        {
            get { return _fields; }
        }
    }
}